<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>公共界面</title>
		<link rel="stylesheet" type="text/css" href="{$webSite}public/css/base.css">
	</head>
	
	<style>
	/*******	公共帖子展示区域	********/
		.public{
			width:960px;
			min-height:200px;
			margin:0 auto;
			margin-bottom:10px;
		}

		/********	顶部向导条guide		*************/
		.guide{
			width:960px;
			height:30px;
			margin:0 auto;
		}
		.guide img{
	
			float:left;
		}
		.guide div{
			min-width:40px;
			max-width:120px;
			margin-left:5px;
			margin-top:3px;
			float:left;
			white-space:nowrap;
			text-overflow:ellipsis;
			overflow:hidden; 
		}
	/*******	左边导航栏 public_nav	  ********/
		.public_nav{
			width:151px;
			float:left;
			border:2px solid #BDD7E3;
		}

		.public_nav_title{
			width:151px;
			height:60px;
			border-bottom:1px #BDD7E3 solid;
			background:#F2F7F9;
			line-height:60px;
			font-size:16px;
			font-weight:bold;

		}

		.public_nav_head{
			width:151px;
			height:40px;
			border-bottom:1px #BDD7E3 solid;
			background:#F2F7F9;
			line-height:40px;
			font-size:14px;

		}
		.public_nav_head div{
			width:120px;
			height:40px;
			border-bottom:1px #BDD7E3 solid;
			background:#F2F7F9;
			line-height:40px;
			font-size:14px;
			white-space:nowrap;
			text-overflow:ellipsis;
			overflow:hidden; 
			float:left;

		}
		.public_nav_head img{
			float:right;
			margin-top:10px;
			margin-right:10px;
		}
		.public_nav_category{
			width:151px;
			height:30px;
			border-bottom:1px #BDD7E3 solid;
			line-height:30px;
			white-space:nowrap;
			text-overflow:ellipsis;
			overflow:hidden; 
		}
		.public_nav_category div{
			width:120px;
			height:30px;
			border-bottom:1px #BDD7E3 solid;
			line-height:30px;
			white-space:nowrap;
			text-overflow:ellipsis;
			overflow:hidden; 
		}
		.public_nav_category:hover{
			background:#F5F9FB;
			font-weight:bold;
			font-size:14px;
			color:#336699;
		}

	/*****	 右边主体内容 public_main	********/
		.public_main{
			width:780px;
			float:left;
			margin-left:25px;
		}
		/****	右边主体顶部 public_main_top	 *****/
		.public_main_top{
			width:778px;
			height:75px;
			border:1px #ccc solid;
		}
		.public_main_top_up{
			width:778px;
			height:50px;
		}
		.public_main_top_title{
			min-width:100px;
			max-width:150px;
			height:50px;
			float:left;
			font-size:16px;
			font-weight:bold;
			line-height:50px;
			white-space:nowrap;
			text-overflow:ellipsis;
			overflow:hidden; 
		}

		.public_main_top_ul{
			width:150px;
			height:50px;
			float:left;
		}

		.public_top_font{
			float:left;
			line-height:50px;
			margin-left:10px;
		}
		.public_top_font span{
			color:red;
			font-weight:bold;
		}
		.public_top_border{
			width:1px;
			height:12px;
			background:#ccc;
			float:left;
			margin-top:20px;
			margin-left:10px;
		}
		.public_main_top_admin{
			
			height:25px;
		}
		/****	发帖, 返回,按钮  public_main_btn*****/
		.public_main_btn{
			width:780px;
			height:70px;
		}
		.btn_post{
			width:80px;
			height:40px;
			background:#7B68EE;
			color:#fff;
			font-size:14px;
			font-weight:bold;
			float:left;
			margin-top:15px;
			margin-left:10px;
		}
		.btn_back{
			width:60px;
			height:30px;
			background:#fff;
			border:#C2D5E3 1px solid;
			float:right;
			margin-top:15px;
			margin-right:10px;
		}
		/****	右边展示主体  public_main_body *****/
		.public_main_body{
			width:778px;
			min-height:100px;
			border:#ccc 1px solid;
		}
		.public_main_body_head_ul{
			width:778px;
			height:40px;
			background:#EFF4F7;
			border-bottom:#ccc 1px solid;
		}
		.body_head_li1{
			float:left;
			line-height:40px;
			margin-left:10px;
		}
		.body_head_li2{
			float:left;
			line-height:40px;
			margin-left:10px;

		}
		.body_head_border{
			width:1px;
			height:12px;
			background:#ccc;
			float:left;
			margin-top:15px;
			margin-left:10px;
		}
		.body_head_li3{
			float:left;
			line-height:40px;
			margin-left:10px;
		}
		.body_head_li4{
			float:left;
			line-height:40px;
			margin-left:340px;

		}
		.body_head_li5{
			float:left;
			line-height:40px;
			margin-left:80px;

		}
		.body_head_li6{
			float:left;
			line-height:40px;
			margin-left:60px;
		}
		.public_main_body_content{
			width:778px;
			height:40px;
			background:#fff;

		}
		.public_main_body_content:hover{
			background:#EFF4F7;

		}
		.body_content_message_pic1{
			float:left;
			margin-top:15px;
			margin-left:10px;
		}
		.body_content_message_title{
			min-width:150px;
			max-width:250px;
			float:left;
			white-space:nowrap;
			text-overflow:ellipsis;
			overflow:hidden; 
			margin-top:15px;
			margin-left:10px;

		}
		.body_content_message_pic2{
			float:left;
			margin-top:15px;
			margin-left:10px;

		}
		.body_content_message_pic2 span{
			color:red;
			font-weight:bold;
		}
		.body_content_message_author{
			width:100px;
			float:right;
			margin-right:10px;
			margin-top:15px;

		}
		.body_content_message_num{
			width:80px;
			float:right;
			margin-right:10px;
			margin-top:15px;

		}
		.body_content_message_time{
			float:right;
			margin-right:10px;
			margin-top:15px;

		}

		/****	右边底部分页栏 public_main_page	*****/
		.public_main_page{
			width:780px;
			height:50px;
		}
		.public_main_page_ul{

		}
		.public_main_page_ul li{
			float:right;
			line-height:50px;
			margin-right:15px;
		}
		.public_main_page_ul li input{
			width:30px;
			height:25px;
			float:left;
			margin-top:12px;
		}
		.public_main_page_ul li span{
			
			font-weight:bold;
		}
	</style>

	<body>
		
		<div class="public clearFix">
			<!-- 向导条部分 -->
			<div class="guide clearFix">
				<img src="{$webSite}public/images/guide.png">
				<div><a href="">论坛 > </a></div>


				<div><a href="">{$parentName} > </a></div>
					
				<div><a href="">{$sonName} > </a></div>
				
			</div>


			<!-- 左边导航栏 public_nav -->
			<div class="public_nav">
				<div class="public_nav_title">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;版块导航</div>
				
				{if $resPub}
				{foreach $resPub as $valPub}
					{if $valPub['parentid'] == 0}
				<div class="public_nav_head clearFix">
					<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$valPub['classname']}</div>
					 <img src="{$webSite}public/images/down.png">
				</div>
					{/if}

				{foreach $resPub as $valSon}
					{if $valSon['parentid'] == $valPub['cid']}
				<a href="{$webSite}public.php?cid={$valSon['cid']}">
					<div class="public_nav_category">
					<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$valSon['classname']}</div>
					</div>
				</a>
					{/if}
				{/foreach}
				
				{/foreach}
				{/if}
			</div>
			
			<!--  右边主体内容 public_main -->
			<div class="public_main ">

				<!-- 右边主体顶部 -->
				<div class="public_main_top">
					{if $resPub}
					{foreach $resPub as $valRight}
						{if $valRight['cid'] == $getCid}

					<div class="public_main_top_up clearFix">
						<div class="public_main_top_title">&nbsp;&nbsp;&nbsp;{$valRight['classname']}</div>
						<ul class="public_main_top_ul clearFix">
							<li class="public_top_font">
								今日: <span>{$todayCount}</span>
							</li>
							<li class="public_top_border"></li>
							<li class="public_top_font">
								主题: <span>{$valRight['motifcount']}</span>
							</li>
						</ul>

					</div>

					<div class="public_main_top_admin">&nbsp;&nbsp;&nbsp;&nbsp;版主: {$valRight['compere']}</div>

						{/if}
					{/foreach}
					{/if}
				</div>

				
				<!-- 右边按钮上 -->
				<div class="public_main_btn clearFix">
					<a href="{$webSite}post.php?cid={$getCid}">
						<button class="btn_post">发 帖</button>
					</a>

					<a href="{$webSite}index.php">
						<button class="btn_back">返 回</button>
					</a>
				</div>

				<!-- 主体帖子内容 -->
				<div class="public_main_body">

					<div class="public_main_body_head">
						<ul class="public_main_body_head_ul clearFix">
							<li class="body_head_li1">筛选: </li>
							<li class="body_head_li2">
								<a href="{$webSite}public.php?cid={$getCid}">全部</a>
							</li>
							<li class="body_head_border"></li>
							<li class="body_head_li3">
								<a href="{$webSite}public.php?cid={$getCid}&elite=1">精华</a>
							</li>
							<li class="body_head_li4">作者</li>
							<li class="body_head_li5">回复 / 查看</li>
							<li class="body_head_li6">最后发表</li>
						</ul>

					</div>
					
					<!-- 分页显示 开始处 -->

					{if $rows}
					{foreach $rows as $valGet}
						
					<div class="public_main_body_content">
						
						<ul class="body_content_message clearFix">
							<li  class="body_content_message_pic1">
								<img src="{$webSite}public/images/title.gif">
							</li>

							<li class="body_content_message_title">

								<a href="{$webSite}detail.php?id={$valGet['id']}">
									<span {if $valGet['style']} style="color:{$valGet['style']};"{/if}>{$valGet['title']}</span>
								</a>
								
							</li>

							<li  class="body_content_message_pic2">
								
								 {if $valGet['rate']>0}
								  - [售价 <span>{$valGet['rate']}</span>  金币]
								 {/if}

								 {if $valGet['elite']}
								<img src="{$webSite}public/images/jh.gif" title="精华帖">
								{/if}
							</li>
							
							<li class="body_content_message_time">{$t=date('Y-m-d H:i:s' ,$valGet['addtime']);}</li>

							<li class="body_content_message_num">{$valGet['replycount']} / {$valGet['hits']}</li>
							
							{if $resPubUser}
							{foreach $resPubUser as $valAdmin}
								{if $valAdmin['uid'] == $valGet['authorid']}
							<li class="body_content_message_author">{$valAdmin['username']}</li>
								{/if}
							{/foreach}
							{/if}
						</ul>
					</div>
						
					{/foreach}
					{/if}
				</div>
		
				<!-- 右边按钮下 -->
				<div class="public_main_btn clearFix">
					<a href="{$webSite}post.php?cid={$getCid}">
						<button class="btn_post">发 帖</button>
					</a>

					<a href="{$webSite}index.php">
						<button class="btn_back">返 回</button>
					</a>
				</div>
				<!-- 右边底部分页栏  -->
				<div class="public_main_page">
					
					<ul class="public_main_page_ul clearFix">
						
						<li>
							本页 <span>{$currPage}</span>/<span>{$total=isset($total)?$total:1;}</span>页
						</li>

						<li>
							
							本页 <span>{$start=isset($offset)?($offset+1):0;}</span>-<span>{$end=$currPage>=$total ? $count : ($currPage * $num);}</span> 条
						</li>

						<li>
							每页显示 <span>{$num=isset($num)?$num:0;}</span> 条
						</li>

						<li>
							共有 <span>{$count=isset($count)?$count:0;}</span> 条记录
						</li>
						
						<li>
							<a href="{$webSite}public.php?page={$total}&cid={$getCid}">尾页</a>
						</li>
						
						<li>
							<a href="{$webSite}public.php?page={$next}&cid={$getCid}">下一页</a>
						</li>

						<li>
							<a href="{$webSite}public.php?page={$prev}&cid={$getCid}">上一页</a>
						</li>

						<li>
							<a href="{$webSite}public.php?page=1&cid={$getCid}">首页</a>
						</li>	
						
						<form action="{$webSite}public.php" method="get" enctype=" multipart/form-data" >
						<li class="clearFix">	
							
							<input type="text" name="page" maxlength="4">
							<input type="hidden" name="cid" value="{$getCid}" maxlength="4">
							<input type="submit" value="GO">
						
						</li>
						</form>


					</ul>
				</div>
			
			</div>
		
		</div>

	</body>
</html>
